hysop.operator.poisson module

@file poisson.py Poisson solver frontend.

class hysop.operator.poisson.Poisson(Fin, Fout, variables, implementation=None, base_kwds=None, **kwds)[source]

Bases: SpectralComputationalGraphNodeFrontend

Interface the poisson solver. Available implementations are: FORTRAN: FFTW based solver (legacy fortran)

PYTHON: generic python fft based solver (pyfftw, scipy or numpy) OPENCL: generic opencl fft based solver (gpyfft)

Initialize a n-dimensional Poisson operator frontend.

Solves:

Laplacian(Fout) = Fin

Parameters:
  • Fout (Field) – Input continuous field (rhs).

  • Fin (Field) – Output continuous field (lhs), possibly inplace.

  • variables (dict) – dictionary of fields as keys and topologies as values.

  • implementation (Implementation, optional, defaults to None) – Target implementation, should be contained in available_implementations(). If None, implementation will be set to default_implementation().

  • base_kwds (dict, optional, defaults to None) – Base class keywords arguments. If None, an empty dict will be passed.

  • kwds – Keywords arguments that will be passed towards implementation poisson operator __init__.

classmethod default_implementation()[source]

Return the default Implementation, should be compatible with available_implementations.

classmethod implementations()[source]

Should return all implementations as a dictionnary. Keys are Implementation instances and values are either ComputationalGraphNode or ComputationalGraphNodeGenerator.